from django.conf.urls import patterns, url

from invoices.views import PurchaseInvoiceListView
from invoices.views import PurchaseInvoiceCreateView
from invoices.views import PurchaseInvoiceDetailView
from invoices.views import PurchaseInvoiceUpdateView
from invoices.views import PurchaseInvoiceDeleteView


urlpatterns = patterns('',
    url(r'^$', 'invoices.views.index',
        name='invoices_indexview'),

    url(r'^purchase/$', PurchaseInvoiceListView.as_view(),
        name='purchase_invoice_listview'),
    url(r'^purchase/create/$', PurchaseInvoiceCreateView.as_view(),
        name='purchase_invoice_createview'),
    url(r'^purchase/(?P<pk>\d+)/$', PurchaseInvoiceDetailView.as_view(),
        name='purchase_invoice_detailview'),
    url(r'^purchase/(?P<pk>\d+)/update/$', PurchaseInvoiceUpdateView.as_view(),
        name='purchase_invoice_updateview'),
    url(r'^purchase/(?P<pk>\d+)/delete/$', PurchaseInvoiceDeleteView.as_view(),
        name='purchase_invoice_deleteview'),
    )
